using System;
using L=Science.Physics.GeneralPhysics;

namespace Serway.Chapter22
{
	/// <summary>
	/// Example07: Change in Entropy-Melting
	/// A solid that has a latent heat of fusion L_f melts
	/// at a temperature T_m
	/// (A) Calculate the change in entropy of this substance
	/// when a mass m of the substance melts.
	/// \Delta S = m L_f / T_m
	/// (B) Estimate the value of the change in entropy of an ice
	/// cube when it melts.
	/// \Delta S = 4 \times 10^1 J/K
	/// </summary>
	public class Example07
	{
		public Example07()
		{
		}
		private string result;
		public string Result
		{
			get{return result;}
		}
		public void Compute()
		{
			L.Mass m = new L.Mass();
			m.kg = 0.03;
			L.Temperature T = new L.Temperature();
			T.K = 273.0;
			L.LatentHeat Lf = new L.LatentHeat();
			Lf.JPERkg = 3.33E5;
			L.Entropy S = new L.Entropy();
			S.JPERK = m.kg*Lf.JPERkg/T.K;
			result+=Convert.ToString(S.JPERK)+"\r\n";  
		}
	}
}
